<template>
  <div class="item clearfix">
    <input type="checkbox" v-model="item.isSelected" class="isSelected">
    {{ item.value }}
    <button @click="del" class="del">删除</button>
  </div>
</template>

<script setup>
const $props = defineProps({
  item: {
    type: Object,
    required: true,
  },
});
const $emits = defineEmits(['del'])
const del = () => {
  $emits('del',$props.item.id)
}
</script>

<style lang="scss" scoped>
.del{
  float: right;
}
</style>
